from time import sleep
import allure
from common.commin.commin import read_ini
from common.log.log import log
from config.conf import BASE_DIR
from po.yc.ht.main.yc_base import YcBase


class YkHomePage(YcBase):
    """
    花王云客后台主页，支持跳转到各个页面
    """

    @allure.step('进入菜单页')
    def go_to_menu_page(self, url, path):
        """
        进入菜单页
        :param path: 菜单路径
        :return:
        """

        try:
            self.driver.get(url + '/admin' + path)
            sleep(0.5)
            log.info(f'进入{path}菜单页')
        except Exception as e:
            log.error(f'进入{path}菜单页，异常为{e}')
            raise e


if __name__ == '__main__':
    pass
